﻿using AntdUI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Angle.Krill
{
    internal static class TableExt
    {
        /// <summary>
        /// 获取选中行
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="table"></param>
        /// <returns></returns>
        public static List<T> GetSelectRow<T>(this Table table) where T : MultipleSelectTable
        {
            var lst = table.DataSource as List<T>;
            List<T> lstSelect = new List<T>();
            foreach (var file in lst)
            {
                if (file.Check)
                {
                    lstSelect.Add(file);
                }
            }

            return lstSelect;
        }
    }
}
